Feature/improvements core#17
Merged
Merged
Conversation
- isDev() defaults to false in production (no __SIBU_DEV__ flag) - globalStore strips __proto__/constructor/prototype from action patches - workerFn JSDoc documents CSP/blob-URL incompatibility - Accessor<T> phantom brand on all reactive getters (signal, derived, memo, memoFn, writable, array) — zero runtime cost, better DX hover - NodeChildren explicitly lists Accessor<NodeChild> - New sibujs-eslint-plugin: no-called-accessor-in-prop warns when a signal getter is called in a prop value position instead of passed directly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Security hardening from internal audit + new
Accessor<T>type for reactive signal getters.Security fixes:
isDev()now defaults tofalsein browser environments without a build flag (wastrue), preventing DevTools from being silently active in production builds that don't use the Vite pluginglobalStore.dispatch()strips__proto__,constructor, andprototypekeys from action patches before merging, preventing prototype pollution via malformed payloadsworker()JSDoc now documents CSP incompatibility (blob:URL /fn.toString()pattern) and theeval()-equivalent risk of user-controlled function argumentsNew
Accessor<T>brand type:signal,derived,memo,memoFn,writable,array,reactiveArray) now returnAccessor<T>instead of plain() => T— zero runtime cost, compile-time phantom brand onlyNodeChild/NodeChildrenexplicitly listAccessor<NodeChild>to surface the distinction in IDE hover tooltipseslint-plugin-sibujsships theno-called-accessor-in-proprule, which warns when a signal getter is called with()in a prop value position and offers an auto-fixRelated Issue
Closes #
Type of Change
Checklist